package com.ruoyi.foreignlanguage.mapper;

import com.ruoyi.foreignlanguage.domain.ExamForeignLanguage;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ExamForeignLanguageMapper {

    @Select("SELECT * FROM tb_foreign_language WHERE id = #{id}")
    ExamForeignLanguage selectForeignLanguageById(Long id);

    @Select("SELECT * FROM tb_foreign_language")
    List<ExamForeignLanguage> selectForeignLanguageList();

    @Insert("INSERT INTO tb_foreign_language (name) VALUES (#{name})")
    int insertForeignLanguage(ExamForeignLanguage foreignLanguage);

    @Update("UPDATE tb_foreign_language SET name = #{name} WHERE id = #{id}")
    int updateForeignLanguage(ExamForeignLanguage foreignLanguage);

    @Delete("DELETE FROM tb_foreign_language WHERE id = #{id}")
    int deleteForeignLanguageById(Long id);
}
